package com.sfac.javaSpringBoot.modules.account.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class AccountController {

    /**
     * 127.0.0.1/login ---- get
     */
    @GetMapping("/login")
    public String loginPage(ModelMap modelMap) {
        modelMap.addAttribute("template", "account/login");
        return "indexSimple";
    }

    /**
     * 127.0.0.1/register ---- get注册
     */
    @GetMapping("/register")
    public String registerPage(ModelMap modelMap) {
        modelMap.addAttribute("template", "account/register");
        return "indexSimple";
    }

    /**
     * 127.0.0.1/account/users
     */
    @GetMapping("/account/users")
    public String usersPage(ModelMap modelMap) {
        modelMap.addAttribute("template", "account/users");
        return "index";
    }

    /**
     * 127.0.0.1/account/profile ---- get
     */
    @GetMapping("/account/profile")
    public String profilePage(ModelMap modelMap) {
        modelMap.addAttribute("template", "account/profile");
        return "index";
    }

}
